<template>
	<view class="page addr">
		<cu-custom bgColor="bg-red" :isBack="true"><block slot="content">场馆详情</block></cu-custom>
		<view class="cu-card">
			<view class="cu-item shadow padding">
				<text class="block text-lg margin-bottom-xs">场馆介绍</text>
				<text class="text-gray">
					在浮躁的时代，好身体，也成为奢侈品。无法坚持去健身？这根本怪不到自个儿，更不是自控力的事儿。
					全球健面计划是致力于让普通人学会健身，把健身融入生活的计划。团队健身模式让我们勾兑了健康和乐趣，原来健身不再只是人与器材的对话。
				</text>
			</view>
		</view>
		<view class="cu-card">
			<view class="cu-item shadow padding">
				<text class="block text-lg margin-bottom-xs">教练配置</text>
				<view class="coach-list">
					<navigator url="/pages/coach/index" class="cu-avatar lg round margin-right" style="background-image:url(https://ossweb-img.qq.com/images/lol/web201310/skin/big25002.jpg);"></navigator>
					<navigator url="/pages/coach/index" class="cu-avatar lg round margin-right" style="background-image:url(https://ossweb-img.qq.com/images/lol/web201310/skin/big25002.jpg);"></navigator>
					<navigator url="/pages/coach/index" class="cu-avatar lg round margin-right" style="background-image:url(https://ossweb-img.qq.com/images/lol/web201310/skin/big25002.jpg);"></navigator>
				</view>
			</view>
		</view>
		<view class="cu-card">
			<view class="cu-item shadow padding">
				<text class="block text-lg margin-bottom-xs">地图导航</text>
				<map style="width: 100%; height: 400upx" :latitude="markers.latitude" :longitude="markers.longitude" :markers="[markers]" @tap="navRoads">
					</map>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name: 'addr',
		data() {
			return {
				markers: {
					latitude: '23.122941',
					longitude: '113.335461',
					iconPath: '/static/image/location.png'
				}
			}
		},
		onLoad(e) {
			console.log(e)
			this.latitude = e.latitude
			this.longitude = e.longitude
		},
		methods: {
			navRoads() {
				wx.getLocation({//获取当前经纬度
					type: 'wgs84',
					success: function (res) {
						wx.openLocation({//​使用微信内置地图查看位置。
							latitude: 23.122941,//要去的纬度-地址
							longitude: 113.335461,//要去的经度-地址
							name: "全球建面功能训练馆",
							address:'金穗路77号临街102馆'
						})
					}
				})
			}
		}
	}
</script>

<style lang="scss">

</style>
